<template>
	<view class="rezu-box"
		:style="{ backgroundImage: 'url(' + infoObj.imgUrl + ')', backgroundRepeat: 'no-repeat', backgroundPosition: 'center center', backgroundSize: '100% 100%' }">
		<scroll-view scroll-x="true" class="scroll-view" show-scrollbar="false">
			<view class="re_zu" v-for="(pro, index) in productList" :key="index"
				@click="$onTo('/pagesClass-rich/product/product?productId=' + (pro.productId || pro.itemId))">
				<view class="hot">
					<text class="hot_nub">{{ index + 1 }}</text>
				</view>
				<view class="hot2">爆品</view>
				<image style="width: 120rpx; height: 120rpx; display: block; margin: 20rpx auto 20rpx auto"
					:lazy-load="true" mode="aspectFit" :webp="true" :src="getFirstImg(pro.src || pro.image)"></image>
				<view class="re_zu_name">
					<text class="re_zu_nam_text">{{ pro.name }}</text>
				</view>
				<view class="re_zu_n">
					<text class="re_zu_nl">￥</text>
					{{ pro.lowestSalePrice || pro.price || pro.sale}}
				</view>
			</view>
		</scroll-view>
	</view>
</template>
<script>
	import {
		request,
		getUserId
	} from '@/utils';
	export default {
		name: 'IndexRezu',
		props: {
			infoObj: {
				type: Object,
				default: {}
			},
			productList: {
				type: Array,
				default: []
			}
		},
		data() {
			return {
				hotProList: [],
				style_type: 0,
				appleActiveList: {},
				//热租榜单下导航栏
				hotcurrent: 0,




				//下面是没用的垃圾混淆代码
				renzhengTimeSta1111111: true, //初次请求认证时间默认是带有的，
				zhuceTimeSta11111: false, //初次请求注册时间默认是没有的
				renzhengTimeList11111: [],
				zhuceTimeStaList1111: null,
				detailOrderIdStr11111: '',
				threeTabCurrent1111: 0,
				applyGOodsList11111: [], //供货商列表
				allCardEnterSta1111: false, //默认是false，点击批量卡券入库的时候变为true
				codeAddNumsList11111: [],
				numsList11111: [],
				dataSourceBqcp1111: [],
				selectedRowKeys1111: [],
				selectedRowKeysB11111: [],
				rkVisible11111: false,
				rkjlVisible1111: false,
				lhjlVisible1111: false,
				currentStyleData22222: {},
				dataSourceStyle2222: [],
				showStyleData2222: false,
				indexTemplate2222: [],
				SVGCircleElement3ee: '',
				vshoweqwsc1111: false,
				showStyleDataInfo2222: false,
				opeCategoryList2222: [],
				leimuVisible2222: false,
				selectedRowKeys02222: [],
				selectionRows02222: [],
				selectedRowKeys133333: [],
				selectionRows13333: [],
				selectedRowKeys2333: [],
				selectionRows23333: [],
				selectedRowKeys33333: [],
				selectionRows33333: [],
				selectedRowKeys4333: [],
				selectionRows43333: [],
				curwfqwrentStyleDaterwaInfo444: {},
				currwerentStywerleDatweraInfo1444: {},
				currewerntStyleDataInfo24444: {},
				currentweStyleDytuataIwenfo34444: {},
				currenwetStdfgyleDataInfo44444: {},
				checkZfbPhone_h5444: '',
				plNafgdvfdtjyme4444: '', //四大品类的名字
				uniPdfgrtylatform444: '', //运行环境mp-alipay mp-weixin
				refgjtytrsemark555: '', //备注
				timefgjSelStr5555: '', //选择的上门时间（2023-08-31 00:00:00）
				amOdcuiofasrpm5555: '', //选择的上门时间是上午还是下午
				pageShnjlkgohowTime5555: '', //页面上用户看到的显示的时间
				paraghsdfmsw454: {},
				valhgujtueNum56756: 0,
				addrdraess56756: {}, //上门收货地址
				adawerterydressId575: 0,
				sceoyuitne57567: '',
				tntuiopId56757: '',
				weictyuratCustomer5756: '',
				yuidurtyuoy567567: false,
			};
		},
		mounted() {},
		created() {},
		methods: {
			getFirstImg(imgsStr) {
				return imgsStr.split(',')[0]
			},
		}
	};
</script>
<style lang="scss" scoped>
	.rezu-box {
		display: flex;
		align-items: flex-end;
		width: 95%;
		margin: 10rpx auto;
		height: 360rpx;
	}

	::-webkit-scrollbar {
		display: none;
		width: 0 !important;
		height: 0 !important;
		-webkit-appearance: none;
		background: transparent;
		color: transparent;
	}

	.scroll-view {
		overflow: hidden;
		white-space: nowrap;
		/*  #ifndef  MP-ALIPAY  */
		margin: 0 20rpx 20rpx 20rpx;
		/*  #endif  */
		/*  #ifdef  MP-ALIPAY  */
		margin: 0 20rpx 0rpx 20rpx;
		/*  #endif  */

		.re_zu {
			background-color: #ffffff;
			border-radius: 20rpx;
			width: 25%;
			margin-right: 25rpx;
			display: inline-block;
			vertical-align: top;
			position: relative;
			height: 250rpx;
			margin-bottom: 16rpx;

			.hot {
				position: absolute;
				left: 5rpx;
				top: 0;
				z-index: 199;
				height: 40rpx;
				width: 30rpx;
				background: url('../../static/shouye-add-rich/new-bcg-4-rich.png');
				background-repeat: no-repeat;
				color: white;
				text-align: center;
			}

			.hot2 {
				position: absolute;
				right: 0;
				top: 0;
				z-index: 99;
				height: 35rpx;
				width: 55rpx;
				color: white;
				background-color: #e60b20;
				font-size: 20rpx;
				font-weight: 600;
				text-align: center;
				line-height: 35rpx;
				border-radius: 20rpx 20rpx 20rpx 0;
			}

			.hot_nub {
				// color: red;
				font-size: 20rpx;
				position: absolute;
				top: 2rpx;
				left: -6rpx;
				right: 0;
			}
		}

		.re_zu:nth-of-type(2) .hot {
			background: url('../../static/shouye-add-rich/new-bcg-2-rich.png');
			background-repeat: no-repeat;
		}

		.re_zu:nth-of-type(3) .hot {
			background: url('../../static/shouye-add-rich/new-bcg-3-rich.png');
			background-repeat: no-repeat;
		}

		.re_zu:first-child .hot {
			background: url('../../static/shouye-add-rich/new-bcg-1-rich.png');
			background-repeat: no-repeat;
		}

		.re_zu_name {
			display: -webkit-box;
			-webkit-box-orient: vertical;
			-webkit-line-clamp: 1;
			overflow: hidden;
			box-sizing: border-box;

			/*  #ifndef  MP-ALIPAY  */
			padding-left: 15rpx;
			padding-right: 15rpx;
			/*  #endif  */

			/*  #ifdef  MP-ALIPAY  */
			padding-left: 20rpx;
			padding-right: 20rpx;
			/*  #endif  */

			.re_zu_nam_text {
				/*  #ifndef  MP-ALIPAY  */
				font-size: 24rpx;
				font-weight: 400;
				color: #333333;
				font-family: Arial;
				word-break: break-all;
				max-width: 100%;
				overflow: hidden;
				text-overflow: ellipsis;
				display: inline-block;
				/*  #endif  */

				/*  #ifdef  MP-ALIPAY  */
				font-size: 24rpx;
				font-weight: 400;
				color: #333333;
				font-family: Arial;
				word-break: break-all;
				/*  #endif  */
			}
		}

		.re_zu_n {
			font-size: 28rpx;
			font-weight: bold;
			color: #e90202;
			// text-align: left;
			margin-left: 10rpx;
			/*  #ifdef  MP-ALIPAY  */
			margin-bottom: 10rpx;
			/*  #endif  */

			.re_zu_nl {
				font-size: 22rpx;
			}
		}
	}
</style>